package com.paw.hys.sa.advice;

import com.paw.hys.sa.exception.BizException;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @author lvzihai
 * @date 2022/8/26
 **/
@Slf4j
@RestControllerAdvice
public class GlobalControllerAdvice {

  @ExceptionHandler(value = BizException.class)
  public String bizExceptionHandler(BizException e){
//    log.error("bizExceptionHandler",e);
    return "RestControllerAdvice bizExceptionHandler";
  }

}
